<?php
namespace app\model;

use think\Model;
use think\model\concern\SoftDelete;

class BaseModel extends Model
{
    // 自动时间戳类型
    protected $autoWriteTimestamp = 'int';
    
    // 时间字段
    protected $createTime = 'created_at';
    protected $updateTime = 'updated_at';
    
    // 软删除
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    
    // 时间字段转换
    protected $type = [
        'created_at' => 'integer',
        'updated_at' => 'integer',
        'delete_time' => 'integer',
    ];
} 